-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSC4071: Pagination Token Headers #4071
base: main
Are you sure you want to change the base?
Conversation
407b907
to
4efe021
Compare
change any time soon (if ever). Whether the advantages outweigh the "ugliness" of this hack is up | ||
for discussion here. | ||
|
||
## Alternatives |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
matrix-org/matrix-spec#223 is vaguely related and might have some other ideas (and links off to other bits).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha! The one term I didn't search for, preflight
:) Linked in alternatives and expanded a bit on things. Essentially I see this MSC as a temporary workaround because it's dead simple to implement, and long run one of the alternatives are the real fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from my one comment I believe this is a much needed change :)
|
||
Servers must treat the values exactly the same as the query string versions. | ||
|
||
If a client makes a request specifying both header and query string servers should reject the request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm I wonder about backwards compatiblity here. If the server doesn't support these headers yet how can a client know about this? Imho it makes sense to allow both to be sent as long as they are identical.
I know this kinda circumvents the point of the proposal however a client could still choose to only send one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative could be to just have it somewhere in I guess the versions endpoint denoted that a server supports this. Clients request that endpoint usually anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was thinking this would be indicated to clients via the versions endpoint (but then only included the unstable flag).
Good point about making the switchover, I think specifying both as long as they're the same is reasonable and avoids having to figure out detection.
## Proposal | ||
|
||
Super simple - clients may pass pagination tokens as a header instead of query parameters using the | ||
format `X-Matrix-Pagination-$PARAM`, the following table lists the available headers by endpoint: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The X-
prefix is deprecated: https://www.rfc-editor.org/rfc/rfc6648 The Matrix-
prefix should be enough to ensure that it doesn't collide with any other HTTP headers.
Rendered.
Signed off by Nick @ Beeper (@Fizzadar) [email protected].
Putting this up for discussion prior to doing any implementation work, but should be very quick to implement.